﻿using Jst.Application.Contracts.IApplication.Auth.Dtos;
using Jst.Application.Contracts.IApplication.Auth.Vos;
using Jst.Domain.Shared.Models;

namespace Jst.Application.Contracts.IApplication.Auth
{
    /// <summary>
    /// 鉴权
    /// </summary>
    public interface IAuthService
    {
        /// <summary>
        /// 换取令牌
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UserloginAuthAsync(InputDto dto);

        /// <summary>
        /// 刷新令牌
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<OutputVo> RefreshTokenAsync(RefreshTokenDto dto);

        /// <summary>
        /// 注销令牌
        /// </summary>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        Task<bool> CancelTokenAsync(string accessToken);
    }
}
